///<reference path="shrimp/shrimp.ts"/>
///<reference path="shrimp/shrimp.events.ts"/>
///<reference path="shrimp/shrimp.assets.ts"/>


var game: Shrimp.Game;
document.addEventListener("DOMContentLoaded", function () {
    game = new Shrimp.Game("#myGame");
    game.events.on("start", function (game) {
        console.log("Starting");
    });

    var x = 0; 
    var y = 0;

    game.events.on("update", function (game, delta) {
        console.log(x + 10 * delta);
        
    });

    game.events.on("draw", function (game) {
        console.log("drawing");
        var ctx = (<Shrimp.Game>game).context;

        ctx.beginPath();
        ctx.arc(x, y, 10, 0, Math.PI*2, true); 
        ctx.closePath();
        ctx.fill();
    });
});
